import { Mt, MtEntity } from '../mt'
import { VipListModel, VipModel } from './interface'

export function transVip(mt: MtEntity): VipModel {
	return {
		mcc: new Mt(mt),
		status: {
			checked: false,
		},
		mtKey: mt.mt_key,
	}
}
export const transVipList = (list: MtEntity[]): VipListModel => {
	const mts = list.map((l) => ({ ...l, conf_level: 2 as MtEntity['conf_level'] })).map((mt) => transVip(mt))
	return mts
}
